package com.reggie.mapper;

import com.reggie.pojo.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.plugin.Interceptor;

import java.util.List;

@Mapper
public interface EmployeeMapper {
    @Select("SELECT * FROM employee WHERE username=#{username} and password=#{password} and status=1")
    Employee find(String username, String password);

    @Select("SELECT * FROM employee WHERE id = #{id}")
    Employee findById(Long id);

    List<Employee> findAll(int page, int pageSize, String name);

    Integer add(Employee employee);

    Integer edit(Employee employee);
}
